// 获取 96 个时间点
export function get96TimePoint() {
  let xData = []
  for (let i = 0; i < 96; i++) {
    xData.push(`${Math.floor(i / 4).toString().padStart(2, '0')}:${(i % 4 * 15).toString().padStart(2, '0')}`)
  }
  return xData
}

// 获取 48 个时间点
export function get48TimePoint() {
  let xData = []
  for (let i = 0; i < 48; i++) {
    xData.push(`${Math.floor(i / 2).toString().padStart(2, '0')}:${(i % 2 * 30).toString().padStart(2, '0')}`)
  }
  return xData
}

// 获取 24 个时间点
export function get24TimePoint() {
  let xData = []
  for (let i = 0; i < 24; i++) {
    xData.push(`${Math.floor(i).toString().padStart(2, '0')}`)
  }
  return xData
}
// 获取 12 个月份
export function get12Month() {
  let xData = []
  for (let i = 1; i <= 12; i++) {
    xData.push(`${i.toString()}月`)
  }
  return xData
}

// 获取 n 随机数
export function getNumbers(n, [min, max]) {
  let xData = []
  for (let i = 0; i < n; i++) {
    xData.push(`${Math.floor(Math.random()*(max-min)+min+1)}`)
  }
  return xData
}

// 获取包含 n 个元素的数组
export function getArray(n) {
  let dataObj = {
    userName: '王小虎',
    address: '二七万达一号院二号楼',
    phone: '13366668888'
  }
  let tableData = []
  for (let i = 0; i < n; i++) {
    let newObj = {
      userName: dataObj.userName + (i + 1),
    }
    tableData.push(Object.assign({}, dataObj, newObj))
  }
  return tableData
}